<html>
<head><meta charset="utf-8"><title>target_has_atomic · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/target_has_atomic.html">target_has_atomic</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="172329053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/target_has_atomic/near/172329053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/target_has_atomic.html#172329053">(Aug 02 2019 at 17:59)</a>:</h4>
<p>Is it correct that on 64bit x86, I cannot use <code>AtomucU128</code>? The compiler tells me there is no such type even when I set the feature flag.</p>



<a name="172329073"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/target_has_atomic/near/172329073" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/target_has_atomic.html#172329073">(Aug 02 2019 at 17:59)</a>:</h4>
<p>Relatedly, does 32bit x86 have <code>AtomucU64</code>?</p>



<a name="172329153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/target_has_atomic/near/172329153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/target_has_atomic.html#172329153">(Aug 02 2019 at 18:00)</a>:</h4>
<p>I am trying to write a test case for <a href="https://github.com/rust-lang/miri/issues/475" target="_blank" title="https://github.com/rust-lang/miri/issues/475">https://github.com/rust-lang/miri/issues/475</a> but I need some atomic type that actually is larger than the alignment its nonatomic version has anyway^^</p>



<a name="172329635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/target_has_atomic/near/172329635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/target_has_atomic.html#172329635">(Aug 02 2019 at 18:07)</a>:</h4>
<blockquote>
<p>Relatedly, does 32bit x86 have <code>AtomucU64</code>?</p>
</blockquote>
<p>the answer seems to be yes</p>



<a name="172339966"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/target_has_atomic/near/172339966" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/target_has_atomic.html#172339966">(Aug 02 2019 at 20:28)</a>:</h4>
<blockquote>
<p>Is it correct that on 64bit x86, I cannot use <code>AtomucU128</code>? The compiler tells me there is no such type even when I set the feature flag.</p>
</blockquote>
<p>Double-size atomics should be available on x86</p>



<a name="172340135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/target_has_atomic/near/172340135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/target_has_atomic.html#172340135">(Aug 02 2019 at 20:30)</a>:</h4>
<p>But it appears that the targets specify max atomic as 64-bits, so there you have it.</p>



<a name="172340749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/target_has_atomic/near/172340749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/target_has_atomic.html#172340749">(Aug 02 2019 at 20:39)</a>:</h4>
<p>so that's a bug in the x86 target specs?</p>



<a name="172341575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/target_has_atomic/near/172341575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/target_has_atomic.html#172341575">(Aug 02 2019 at 20:54)</a>:</h4>
<p>/me shrugs. Knowing that there’s double-wide cmpxchg on x86_64, I would expect atomics to work based on that.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>